﻿using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;





public class MeshBaseNode
{
    // 基本的Mesh信息
    // 设置buffer的时候指定大小，我这里指定8192，应该不会比这个更大了
    public List<float3> verticeList;
    public List<uint> indiceList;

    public struct GBMesh
    {
        uint verticeStart, verticeLen;
        uint indiceStart, indiceLen;
    }

    //后面使用 StructuredBuffer 保存所有的mesh信息
    public List<GBMesh> meshList;

    // 每64个一组
    public List<uint> clusterIndexList;

    public struct GBCluster
    {
        // 对应的mesh的Index
        public uint meshIdx;
        // 当前的cluster的index
        public uint clusterIdx;
    }

    // 所有的cluster
    public List<GBCluster> clusterList;

    public struct GBBound
    {
        public float3 pos;
        public float3 extent;
    }

    public struct GDInstance
    {
        public float4x4 transform;
        public GBBound bound;
        public int mesh;
    }


}
